package task.manager;

import junit.framework.Assert;
import junit.framework.TestCase;

/**
 * Test class for the Category class.
 * 
 * @author RUSKIN
 * @version 1
 */
public class CategoryTest extends TestCase {

	// Variables for testing.
	Category category;
	Integer hour, minute;
	TaskList taskList;
	
	/**
	 * Greg's test method for {@link task.manager.Category#createTask(java.lang.String, int, int, int, java.lang.Integer, java.lang.Integer)}.
	 */
	public void testCreateTask() {
		
		category = new Category("category1");
		Assert.assertEquals(category.getName(), "category1");
		hour = 1;
		minute = 1;
		category.createTask("task1", 1, 1, 1, hour, minute);
		taskList = category.getTaskList();
		Assert.assertEquals(taskList.getTask("task1").getTitle(),"task1");
		Assert.assertEquals(taskList.getTask("task0"), null);
		category.createTask("task2", 2, 2, 2, hour, minute);
		Assert.assertEquals(taskList.getTask("task2").getTitle(),"task2");
	
	} // End of testCreateTask() method.

} // End of CategoryTest class.
